package com.wufan.day03;

/**
 * 方法的形参的传递机制
 *
 * @author SongWufan
 * @date 2021/3/8 19:45
 */
public class ValueTransferTest1 {
    public static void main(String[] args) {
        //交换两个变量的值
        int m = 10;
        int n = 20;
        ValueTransferTest1 valueTransferTest1 = new ValueTransferTest1();
        valueTransferTest1.swap(m,n);
    }
    public void swap(int m, int n) {
        int temp = m;
        m = n;
        n = temp;
        System.out.println("m"+m+"n"+n);
    }
}
